/* 
 *  VesselData
 *
 *  VesselData is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Foobar is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY ); without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 **********************************************************************************
 *  WARNING: THIS CODE WAS GENERATED DO NOT MODIFY, CHANGE THE XSD INSTEAD
 *  Generated by schema2code on Tue Jun 14 15:34:00 2016.
 **********************************************************************************
 *  Copyright 2010
 *
 */

#ifndef __VESSELDATA_H__
#define __VESSELDATA_H__

#include <QObject>
#include <QString>
#include <QDateTime>
#include "IVEFConstruction.h"
#include "IVEFIdentifier.h"

class XmlStreamReader;

namespace ivef {

//-----------------------------------------------------------
//! \brief       Class definition of VesselData
//!
//! DATA regarding static elements of an object
//!
class VesselData : public QObject { 
    Q_OBJECT

public:
    //! constructor
    //!
    VesselData();
    //! constructor for parser function
    //!
    VesselData(XmlStreamReader&);
    //! copy constructor
    //!
    VesselData(const VesselData&);
    //! = operator
    //!
    VesselData & operator=(const VesselData& val);
    //! == operator
    //!
    bool operator==(const VesselData& val);
    //! sets the Construction: attributes of the object regarding the physical construction
    //!
    bool setConstruction(const Construction& val);

    //! gets the Construction: attributes of the object regarding the physical construction
    //!
    //! \return     Construction
    //!
    const Construction& getConstruction() const;

    //! returns true if Constructionis used (optional field).
    //!
    //! \return     bool
    bool hasConstruction() const;

    //! sets the Identifier: (local) Identification of vessel
    //!
    bool setIdentifier(const Identifier& val);

    //! gets the Identifier: (local) Identification of vessel
    //!
    //! \return     Identifier
    //!
    const Identifier& getIdentifier() const;

    //! returns true if Identifieris used (optional field).
    //!
    //! \return     bool
    bool hasIdentifier() const;

    //! sets the Class: 0 = Unknown\n
    //! 1 = Vessel\n
    //! 2 = Aids to Navigate
    //!
    bool setClass(int val);

    //! gets the Class: 0 = Unknown\n
    //! 1 = Vessel\n
    //! 2 = Aids to Navigate
    //!
    //! \return     int
    //!
    int getClass() const;

    //! returns true if Classis used (optional field).
    //!
    //! \return     bool
    bool hasClass() const;

    //! sets the BlackListed: Vessel is blacklisted by a NCA
    //!
    bool setBlackListed(bool val);

    //! gets the BlackListed: Vessel is blacklisted by a NCA
    //!
    //! \return     bool
    //!
    bool getBlackListed() const;

    //! returns true if BlackListedis used (optional field).
    //!
    //! \return     bool
    bool hasBlackListed() const;

    //! sets the Id: The unique identification of this vesseldata. Valid from first message with TrackStatus!=Terminated to first message with TrackStatus=Terminated
    //!
    bool setId(int val);

    //! gets the Id: The unique identification of this vesseldata. Valid from first message with TrackStatus!=Terminated to first message with TrackStatus=Terminated
    //!
    //! \return     int
    //!
    int getId() const;

    //! sets the SpecialAttention: Vessel is under special attention of the NCA or fairway authorities
    //!
    bool setSpecialAttention(QString val);

    //! gets the SpecialAttention: Vessel is under special attention of the NCA or fairway authorities
    //!
    //! \return     QString
    //!
    QString getSpecialAttention() const;

    //! returns true if SpecialAttentionis used (optional field).
    //!
    //! \return     bool
    bool hasSpecialAttention() const;

    //! sets the SourceId: Unique identification of the producer  (UN/LOCODE)  in case multiple producers exist on the same LOCODE, the local competent authority can optionally addended this with a local  code (e.g. BE ANR 01 = Antwerp, 01)
    //!
    bool setSourceId(QString val);

    //! gets the SourceId: Unique identification of the producer  (UN/LOCODE)  in case multiple producers exist on the same LOCODE, the local competent authority can optionally addended this with a local  code (e.g. BE ANR 01 = Antwerp, 01)
    //!
    //! \return     QString
    //!
    QString getSourceId() const;

    //! returns true if SourceIdis used (optional field).
    //!
    //! \return     bool
    bool hasSourceId() const;

    //! sets the SourceName: Identification of the originator of the data
    //!
    bool setSourceName(QString val);

    //! gets the SourceName: Identification of the originator of the data
    //!
    //! \return     QString
    //!
    QString getSourceName() const;

    //! sets the SourceType: Source/originator type: 0 = Unknown, 1 = Transponder, 2 = Database (VTS Plan Server), 3 = Manual (VTS Officer), 4 =  Fused,  5 = External Source
    //!
    bool setSourceType(int val);

    //! gets the SourceType: Source/originator type: 0 = Unknown, 1 = Transponder, 2 = Database (VTS Plan Server), 3 = Manual (VTS Officer), 4 =  Fused,  5 = External Source
    //!
    //! \return     int
    //!
    int getSourceType() const;

    //! sets the UpdateTime: Date and time in UTC format (YYYY-MM-DDThh:mm:ss.sssZ)  (subset of ISO 8601) this data was compiled
    //!
    bool setUpdateTime(QDateTime val);

    //! gets the UpdateTime: Date and time in UTC format (YYYY-MM-DDThh:mm:ss.sssZ)  (subset of ISO 8601) this data was compiled
    //!
    //! \return     QDateTime
    //!
    QDateTime getUpdateTime() const;

    //! generates XML of this object including attributes and child elements
    //! returns QString::null if not all required elements are available
    //! If null returned check lastError() for problem description
    //!
    //! \return     QString
    const QString& toXML(bool outputNamespace = true);

    //! generates output of this object including attributes and child elements
    //!
    //! \return     QString
    QString toString() const;

    //! generates output of this object including attributes and child elements
    //!
    //! \return     QString
    QString toString(QString lead) const;

    //! return last error found in toXML function
    //!
    //! \return     QString
    const QString& lastError() const;

    //! return changed 
    //!
    //! \return     bool
    const bool& changed() const;

    //! return store 
    //!
    //! \return     QString
    const QString& store() const;


private:
    Construction m_construction;
    bool m_constructionPresent;
    Identifier m_identifier;
    bool m_identifierPresent;
    int m_class;
    bool m_classPresent;
    bool m_blackListed;
    bool m_blackListedPresent;
    int m_id;
    bool m_idPresent;
    QString m_specialAttention;
    bool m_specialAttentionPresent;
    QString m_sourceId;
    bool m_sourceIdPresent;
    QString m_sourceName;
    bool m_sourceNamePresent;
    int m_sourceType;
    bool m_sourceTypePresent;
    QDateTime m_updateTime;
    bool m_updateTimePresent;
    QString m_lastError; 
    bool m_changed; 
    QString m_store;
}; 
} //end ns

#endif
